<template>
    <el-container style="height: 100vh; border: 1px solid #eee;min-width: 500px;">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246);">
        <el-menu router :default-active="this.$route.path">
          <el-sub-menu>
            <template #title>
              <el-icon><message /></el-icon>后台管理
            </template>
<el-menu-item-group>
    <el-menu-item index="/article/create">新建文章</el-menu-item>
    <el-menu-item index="/article/list">文章列表</el-menu-item>
</el-menu-item-group>
</el-sub-menu>

</el-menu>
</el-aside>

<el-container>
    <el-header style="text-align: right;">
        <h1>后台数据展示</h1>
    </el-header>

    <el-main>
        <router-view/>
    </el-main>
</el-container>
</el-container>
</template>

<script>
    import {
        defineComponent,
        ref
    } from 'vue'
    import {
        Message,
        Menu,
        Setting
    } from '@element-plus/icons'

    export default defineComponent({
        components: {
            Message,
            Setting,
            'icon-menu': Menu,
        }
    })
</script>

<style>
    .el-header {
        background-color: #b3c0d1;
        color: var(--el-text-color-primary);
        line-height: 60px;
    }
    
    .el-aside {
        color: var(--el-text-color-primary);
    }
    
    @media screen and (max-width: 500px) {
        .el-aside {
            position: absolute;
            z-index: 100;
        }
    }
</style>